St got its own enum type years ago, so use that.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2733>
const UI = imports.testcommon.ui;
-const { Clutter, GObject, Gtk, Shell, St } = imports.gi;
+const {Clutter, GObject, Shell, St} = imports.gi;
// This is an interactive test of the sizing behavior of StScrollView. It
// may be interesting in the future to split out the two classes at the
button.label = 'AUTOMATIC';
break;
}
- scrollView.set_policy(Gtk.PolicyType[hpolicy.label], Gtk.PolicyType[vpolicy.label]);
+ scrollView.set_policy(St.PolicyType[hpolicy.label], St.PolicyType[vpolicy.label]);
}
hpolicy.connect('clicked', () => { togglePolicy(hpolicy); });
const UI = imports.testcommon.ui;
-const { Clutter, Gtk, St } = imports.gi;
+const {Clutter, St} = imports.gi;
function test() {
let stage = new Clutter.Stage();
vbox.add(v, { expand: true });
toggle.connect('notify::checked', () => {
- v.set_policy(toggle.checked ? Gtk.PolicyType.AUTOMATIC
- : Gtk.PolicyType.NEVER,
- Gtk.PolicyType.AUTOMATIC);
+ v.set_policy(toggle.checked ? St.PolicyType.AUTOMATIC
+ : St.PolicyType.NEVER,
+ St.PolicyType.AUTOMATIC);
});
let b = new St.BoxLayout({ vertical: true,
const Config = imports.misc.config;
-imports.gi.versions = { Clutter: Config.LIBMUTTER_API_VERSION, Gtk: '3.0' };
+imports.gi.versions = {Clutter: Config.LIBMUTTER_API_VERSION};
const { Clutter, Gio, GLib, St } = imports.gi;